package com.dao.tm;

import com.model.tm.StoreModel;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository("tmStoreDao")
public interface StoreDao {

	/**
	 * 新增
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int insert(StoreModel storeModel);

	int deleteByStoFac(String stoFac);

	List<StoreModel> selectByStoFac(String stoFac);

	int deleteByStoAddress(String stoAddress);

	List<StoreModel> selectByStoAddress(String stoAddress);

	int deleteByStoMmCode(String stoMmCode);

	List<StoreModel> selectByStoMmCode(String stoMmCode);

	int deleteAll();

	/**
	 * 刪除
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int delete(@Param("stoFac") String stoFac, @Param("stoAddress") String stoAddress,
			@Param("stoMmCode") String stoMmCode);

	/**
	 * 更新
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int update(StoreModel storeModel);

	/**
	 * 查询 根据主键 id 查询
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	StoreModel load(@Param("stoFac") String stoFac, @Param("stoAddress") String stoAddress,
			@Param("stoMmCode") String stoMmCode);

	// 列表
	List<StoreModel> selectList(Map<String, Object> map);

	// 列表总数
	int selectListCount(Map<String, Object> map);
}